]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Set Adjustment value after allocation
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 17 Jun 2019 10:59:01 +0000 (12:59 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 18 Jun 2019 21:22:32 +0000 (23:22 +0200)
AllView's adaptToSize is called as part of viewStack allocation vfunc, and this
makes the adjustment value to be reset while relayouting.

So, fix this by delaying this using the Meta later that we already had for
pageIndicators operations.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1392
js/ui/appDisplay.js

index d069a1e82d7fad0e6be9ee064a0fed128d712505..ea86c81b9ace54a153e8a013978d14a8e018d064 100644 (file)
@@ -632,9 +632,9 @@ var AllView = class AllView extends BaseAppView {
             this._scrollView.get_effect('fade').fade_edges = true;
 
         if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
-            this._adjustment.value = 0;
-            this._grid.currentPage = 0;
             Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
+                this._adjustment.value = 0;
+                this._grid.currentPage = 0;
                 this._pageIndicators.setNPages(this._grid.nPages());
                 this._pageIndicators.setCurrentPage(0);
             });